package biz

import (
	"user-web/src/api"
	"user-web/src/request"
)

type IUserService interface {

	//Login 用户登录接口
	Login(loginRequest *request.LoginRequest) *api.JsonResult

	//Query 用户信息查询接口
	Query(infoRequest *request.InfoRequest) *api.JsonResult

	//UpdateNickname 更新昵称
	UpdateNickname(loginRequest *request.EditNicknameRequest) *api.JsonResult

	//UpdateProfile 更新头像
	UpdateProfile(loginRequest *request.UploadProfileRequest) *api.JsonResult

	//RefreshToken token块过期之前，客户端刷新token
	RefreshToken(username string) *api.JsonResult
}

var userService IUserService

func RefUserService() IUserService {
	return userService
}

func InjectUserService(impl IUserService) {
	userService = impl
}
